package jdk;

import java.util.ArrayList;
import java.util.List;

/**
 * @program: algorithm
 * @description:
 * @author: 陈恩涛
 * @create: 2021-09-22 09:55
 **/
public class Iterator {
    public static void main(String[] args) {
        List<String> a = new ArrayList<String>();
        a.add("jack");
        java.util.Iterator<String> iterator = a.iterator();
        while (iterator.hasNext()) {
            System.out.println(iterator.next());
        }
    }
}
